﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using POI.eTransmittal.BusinessRule;

namespace POI.eTransmittal.WebApp
{
    public partial class _Default : BasePage
    {
        protected void Page_Init(object sender, EventArgs e)
        {
            Page.Response.Redirect("main.aspx");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
        //    CommonBusinessRules.ImportLDAP_USER(CurrentUnitOfWork,"http://jakarta10/LDAPQueryWebService/LDAPQuery.asmx");

        }

        protected void ASPxUploadControl1_FileUploadComplete(object sender, DevExpress.Web.ASPxUploadControl.FileUploadCompleteEventArgs e)
        {
          //  e.UploadedFile.SaveAs(
        }

        protected void ASPxUploadControl2_FileUploadComplete(object sender, DevExpress.Web.ASPxUploadControl.FileUploadCompleteEventArgs e)
        {
         string temPath=   System.IO.Path.GetTempPath();
         string tempName = System.IO.Path.GetTempFileName();
         tempName = tempName.Replace(".tmp", ".pdf");
         string pathFileName = System.IO.Path.Combine(temPath, tempName);
         e.UploadedFile.SaveAs(pathFileName);
         e.CallbackData ="PDFViewerForm.aspx?pdfFileName="+ @"file://adam-pc/temp/Transmittal/Mar%202012/incoming/TI-1203-27.pdf";
         e.IsValid = true;
        }
    }
}